A Flash (flash memory) is a non-volatile memory that is made by using a semiconductor floating-gate technology. It can retain stored data information even in a case of a power outage. The Flash indicates a state of stored data by using a floating gate that is either charged or not, that is, indicates stored data 0 by charging a floating gate, which is referred to as programming, and indicates stored data 1 by removing an electric charge from the floating gate, which is referred to as erasing. Regarding the Flash, any data bit must be completely erased before being used for storage. However, due to a technical limitation, erasing in the Flash must be performed on a block basis.
One block in a Flash has several pages. As shown in FIG. 1, if data on a page 1 and a page 2 in a block A needs to be updated into data to be written, a new block B is found and the data to be written is written into a page 1 and a page 2 of the block B; data, which does not need to be updated, on remaining 62 pages in the block A is read and written into a corresponding position in the block B; and then the block A is entirely erased for storing data later.
During implementation of the present invention, the inventor finds that the prior art has at least the following problems: In a process of storing the data to be written, the data that does not need to be updated in the block A is read and written into the block B, which increases the times of read operations and write operations, thereby reducing the operating efficiency and shortening a service life of the Flash.